import random

number = random.randint(1, 100)
guess_number = int(input('请输入您的数字：'))
count = 1
while number != guess_number:

    count += 1
    print('您猜错了，值偏' + '大' if guess_number > number else '小')
    guess_number = int(input('请再次输入猜数'))
print('恭喜你，您'+str(count)+'次猜对了'+str(guess_number)+'='+str(number))
